<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Vue</title>
    <!--引入Vue-->
    <script type="text/javascript" src="../js/vue.js"></script>
</head>
<body>
<!--准备好一个容器-->
<div class="root">

</div>


<script type="text/javascript">
    let number=18;
    let person={
        name:'张三',
        sex:'男'
    };

    Object.defineProperty(person,'age',{
        // value:18,
        // enumerable:true,//可枚举，默认不可枚举
        // writable:true,//可修改，默认不可修改
        // configurable:true//可被删除，默认不可删除

        get:function () {
            console.log('有人读取了age属性');
            return number;
        }
    });
</script>
</body>
</html>